<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Math</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Math</div>  </div>
</div><!--header-->
<div class="contents">

<p>Floating point and integer math, matrices, vectors.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_affine_matrix.html">Sifteo::AffineMatrix</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An augmented 3x2 matrix, for doing 2D affine transforms.  <a href="struct_sifteo_1_1_affine_matrix.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_random.html">Sifteo::Random</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pseudo-random number generator.  <a href="struct_sifteo_1_1_random.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_vector2.html">Sifteo::Vector2&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generalized two-element cartesian coordinate vector.  <a href="struct_sifteo_1_1_vector2.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_vector3.html">Sifteo::Vector3&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generalized three-element cartesian coordinate vector.  <a href="struct_sifteo_1_1_vector3.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga08dfac3cca9601a02fc88356cc078e1d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga08dfac3cca9601a02fc88356cc078e1d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga08dfac3cca9601a02fc88356cc078e1d">M_1_PI</a>&#160;&#160;&#160;0.318309886183790671537767526745028724</td></tr>
<tr class="memdesc:ga08dfac3cca9601a02fc88356cc078e1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">1/pi <br/></td></tr>
<tr class="separator:ga08dfac3cca9601a02fc88356cc078e1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97f6d6514d3d3dd50c3a2a6d622673db"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga97f6d6514d3d3dd50c3a2a6d622673db"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga97f6d6514d3d3dd50c3a2a6d622673db">M_2_PI</a>&#160;&#160;&#160;0.636619772367581343075535053490057448</td></tr>
<tr class="memdesc:ga97f6d6514d3d3dd50c3a2a6d622673db"><td class="mdescLeft">&#160;</td><td class="mdescRight">2/pi <br/></td></tr>
<tr class="separator:ga97f6d6514d3d3dd50c3a2a6d622673db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga631ff334c4a1a6db2e8a7ff4acbe48a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga631ff334c4a1a6db2e8a7ff4acbe48a5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga631ff334c4a1a6db2e8a7ff4acbe48a5">M_2_SQRTPI</a>&#160;&#160;&#160;1.12837916709551257389615890312154517</td></tr>
<tr class="memdesc:ga631ff334c4a1a6db2e8a7ff4acbe48a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">2/sqrt(pi) <br/></td></tr>
<tr class="separator:ga631ff334c4a1a6db2e8a7ff4acbe48a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9bf5d952c5c93c70f9e66c9794d406c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9bf5d952c5c93c70f9e66c9794d406c9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga9bf5d952c5c93c70f9e66c9794d406c9">M_E</a>&#160;&#160;&#160;2.71828182845904523536028747135266250</td></tr>
<tr class="memdesc:ga9bf5d952c5c93c70f9e66c9794d406c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">e <br/></td></tr>
<tr class="separator:ga9bf5d952c5c93c70f9e66c9794d406c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a53871497a155afe91424c28a8ec3c4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0a53871497a155afe91424c28a8ec3c4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga0a53871497a155afe91424c28a8ec3c4">M_LN10</a>&#160;&#160;&#160;2.30258509299404568401799145468436421</td></tr>
<tr class="memdesc:ga0a53871497a155afe91424c28a8ec3c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">log e10 <br/></td></tr>
<tr class="separator:ga0a53871497a155afe91424c28a8ec3c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92428112a5d24721208748774a4f23e6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga92428112a5d24721208748774a4f23e6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga92428112a5d24721208748774a4f23e6">M_LN2</a>&#160;&#160;&#160;0.693147180559945309417232121458176568</td></tr>
<tr class="memdesc:ga92428112a5d24721208748774a4f23e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">log e2 <br/></td></tr>
<tr class="separator:ga92428112a5d24721208748774a4f23e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ed2b5582226f3896424ff6d2a3ebb14"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9ed2b5582226f3896424ff6d2a3ebb14"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga9ed2b5582226f3896424ff6d2a3ebb14">M_LOG10E</a>&#160;&#160;&#160;0.434294481903251827651128918916605082</td></tr>
<tr class="memdesc:ga9ed2b5582226f3896424ff6d2a3ebb14"><td class="mdescLeft">&#160;</td><td class="mdescRight">log 10e <br/></td></tr>
<tr class="separator:ga9ed2b5582226f3896424ff6d2a3ebb14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5c747ee5bcbe892875672a0b9d8171c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac5c747ee5bcbe892875672a0b9d8171c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gac5c747ee5bcbe892875672a0b9d8171c">M_LOG2E</a>&#160;&#160;&#160;1.44269504088896340735992468100189214</td></tr>
<tr class="memdesc:gac5c747ee5bcbe892875672a0b9d8171c"><td class="mdescLeft">&#160;</td><td class="mdescRight">log 2e <br/></td></tr>
<tr class="separator:gac5c747ee5bcbe892875672a0b9d8171c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae71449b1cc6e6250b91f539153a7a0d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae71449b1cc6e6250b91f539153a7a0d3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.14159265358979323846264338327950288</td></tr>
<tr class="memdesc:gae71449b1cc6e6250b91f539153a7a0d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">pi <br/></td></tr>
<tr class="separator:gae71449b1cc6e6250b91f539153a7a0d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga958e4508ed28ee5cc04249144312c15f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga958e4508ed28ee5cc04249144312c15f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga958e4508ed28ee5cc04249144312c15f">M_PI_2</a>&#160;&#160;&#160;1.57079632679489661923132169163975144</td></tr>
<tr class="memdesc:ga958e4508ed28ee5cc04249144312c15f"><td class="mdescLeft">&#160;</td><td class="mdescRight">pi/2 <br/></td></tr>
<tr class="separator:ga958e4508ed28ee5cc04249144312c15f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb24420b096a677f3a2dc5a72b36bf22"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaeb24420b096a677f3a2dc5a72b36bf22"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gaeb24420b096a677f3a2dc5a72b36bf22">M_PI_4</a>&#160;&#160;&#160;0.785398163397448309615660845819875721</td></tr>
<tr class="memdesc:gaeb24420b096a677f3a2dc5a72b36bf22"><td class="mdescLeft">&#160;</td><td class="mdescRight">pi/4 <br/></td></tr>
<tr class="separator:gaeb24420b096a677f3a2dc5a72b36bf22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacdbb2c2f9429f08916f03c8786d2d2d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacdbb2c2f9429f08916f03c8786d2d2d7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gacdbb2c2f9429f08916f03c8786d2d2d7">M_SQRT1_2</a>&#160;&#160;&#160;0.707106781186547524400844362104849039</td></tr>
<tr class="memdesc:gacdbb2c2f9429f08916f03c8786d2d2d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">1/sqrt(2) <br/></td></tr>
<tr class="separator:gacdbb2c2f9429f08916f03c8786d2d2d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga66b3ab30f1332874326ed93969e496e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga66b3ab30f1332874326ed93969e496e0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga66b3ab30f1332874326ed93969e496e0">M_SQRT2</a>&#160;&#160;&#160;1.41421356237309504880168872420969808</td></tr>
<tr class="memdesc:ga66b3ab30f1332874326ed93969e496e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">sqrt(2) <br/></td></tr>
<tr class="separator:ga66b3ab30f1332874326ed93969e496e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0f7f25bda391b76da8251153e463a17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae0f7f25bda391b76da8251153e463a17"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae0f7f25bda391b76da8251153e463a17">M_TAU</a>&#160;&#160;&#160;6.2831853071795862</td></tr>
<tr class="memdesc:gae0f7f25bda391b76da8251153e463a17"><td class="mdescLeft">&#160;</td><td class="mdescRight">2 * pi <br/></td></tr>
<tr class="separator:gae0f7f25bda391b76da8251153e463a17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e9e29217f6ec61105a4520ec5942225"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5e9e29217f6ec61105a4520ec5942225"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga5e9e29217f6ec61105a4520ec5942225">MAXFLOAT</a>&#160;&#160;&#160;((float)3.40282346638528860e+38)</td></tr>
<tr class="memdesc:ga5e9e29217f6ec61105a4520ec5942225"><td class="mdescLeft">&#160;</td><td class="mdescRight">Largest single-precision float value. <br/></td></tr>
<tr class="separator:ga5e9e29217f6ec61105a4520ec5942225"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8abfcc76130f3f991d124dd22d7e69bc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8abfcc76130f3f991d124dd22d7e69bc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga8abfcc76130f3f991d124dd22d7e69bc">NAN</a>&#160;&#160;&#160;__builtin_nanf(&quot;0x7fc00000&quot;)</td></tr>
<tr class="memdesc:ga8abfcc76130f3f991d124dd22d7e69bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Not a Number constant. <br/></td></tr>
<tr class="separator:ga8abfcc76130f3f991d124dd22d7e69bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga646e59d09468008d8b58afeb33a49b38"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga646e59d09468008d8b58afeb33a49b38"></a>
typedef Vector2&lt; int8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga646e59d09468008d8b58afeb33a49b38">Sifteo::Byte2</a></td></tr>
<tr class="memdesc:ga646e59d09468008d8b58afeb33a49b38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of bytes. <br/></td></tr>
<tr class="separator:ga646e59d09468008d8b58afeb33a49b38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaec7afb90b5c1db8751abaf5f0406f6b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaec7afb90b5c1db8751abaf5f0406f6b7"></a>
typedef Vector3&lt; int8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gaec7afb90b5c1db8751abaf5f0406f6b7">Sifteo::Byte3</a></td></tr>
<tr class="memdesc:gaec7afb90b5c1db8751abaf5f0406f6b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of bytes. <br/></td></tr>
<tr class="separator:gaec7afb90b5c1db8751abaf5f0406f6b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2de6d1897dbf008f866b526a08c3707f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2de6d1897dbf008f866b526a08c3707f"></a>
typedef Vector2&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga2de6d1897dbf008f866b526a08c3707f">Sifteo::Double2</a></td></tr>
<tr class="memdesc:ga2de6d1897dbf008f866b526a08c3707f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of double-precision floats. <br/></td></tr>
<tr class="separator:ga2de6d1897dbf008f866b526a08c3707f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27a00f39e0d622233fe4eb671d38fa28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga27a00f39e0d622233fe4eb671d38fa28"></a>
typedef Vector3&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga27a00f39e0d622233fe4eb671d38fa28">Sifteo::Double3</a></td></tr>
<tr class="memdesc:ga27a00f39e0d622233fe4eb671d38fa28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of double-precision floats. <br/></td></tr>
<tr class="separator:ga27a00f39e0d622233fe4eb671d38fa28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga142c5de33f25b2f04428b16b309c9765"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga142c5de33f25b2f04428b16b309c9765"></a>
typedef Vector2&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga142c5de33f25b2f04428b16b309c9765">Sifteo::Float2</a></td></tr>
<tr class="memdesc:ga142c5de33f25b2f04428b16b309c9765"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of floats. <br/></td></tr>
<tr class="separator:ga142c5de33f25b2f04428b16b309c9765"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c88e729af0eb9bdaeab6845bb685874"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4c88e729af0eb9bdaeab6845bb685874"></a>
typedef Vector3&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga4c88e729af0eb9bdaeab6845bb685874">Sifteo::Float3</a></td></tr>
<tr class="memdesc:ga4c88e729af0eb9bdaeab6845bb685874"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of floats. <br/></td></tr>
<tr class="separator:ga4c88e729af0eb9bdaeab6845bb685874"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4aa5e1c76d3adebd72a73a7051ad1fe0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4aa5e1c76d3adebd72a73a7051ad1fe0"></a>
typedef Vector2&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga4aa5e1c76d3adebd72a73a7051ad1fe0">Sifteo::Int2</a></td></tr>
<tr class="memdesc:ga4aa5e1c76d3adebd72a73a7051ad1fe0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of ints. <br/></td></tr>
<tr class="separator:ga4aa5e1c76d3adebd72a73a7051ad1fe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf60fc5d5c0643721fc47d903088be0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadf60fc5d5c0643721fc47d903088be0e"></a>
typedef Vector3&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gadf60fc5d5c0643721fc47d903088be0e">Sifteo::Int3</a></td></tr>
<tr class="memdesc:gadf60fc5d5c0643721fc47d903088be0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of ints. <br/></td></tr>
<tr class="separator:gadf60fc5d5c0643721fc47d903088be0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b7628e29e2b48dca071eeb4dc426852"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4b7628e29e2b48dca071eeb4dc426852"></a>
typedef Vector2&lt; short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga4b7628e29e2b48dca071eeb4dc426852">Sifteo::Short2</a></td></tr>
<tr class="memdesc:ga4b7628e29e2b48dca071eeb4dc426852"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of shorts. <br/></td></tr>
<tr class="separator:ga4b7628e29e2b48dca071eeb4dc426852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7f0a2eaa3374dd2b52d2d10d3a123e4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae7f0a2eaa3374dd2b52d2d10d3a123e4"></a>
typedef Vector3&lt; short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae7f0a2eaa3374dd2b52d2d10d3a123e4">Sifteo::Short3</a></td></tr>
<tr class="memdesc:gae7f0a2eaa3374dd2b52d2d10d3a123e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of shorts. <br/></td></tr>
<tr class="separator:gae7f0a2eaa3374dd2b52d2d10d3a123e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadad7b6303d3c62a27f4ee78e3cdd29b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadad7b6303d3c62a27f4ee78e3cdd29b6"></a>
typedef Vector2&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gadad7b6303d3c62a27f4ee78e3cdd29b6">Sifteo::UByte2</a></td></tr>
<tr class="memdesc:gadad7b6303d3c62a27f4ee78e3cdd29b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned bytes. <br/></td></tr>
<tr class="separator:gadad7b6303d3c62a27f4ee78e3cdd29b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9f905eaec08f79d6c938b70ce4007e53"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f905eaec08f79d6c938b70ce4007e53"></a>
typedef Vector3&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga9f905eaec08f79d6c938b70ce4007e53">Sifteo::UByte3</a></td></tr>
<tr class="memdesc:ga9f905eaec08f79d6c938b70ce4007e53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned bytes. <br/></td></tr>
<tr class="separator:ga9f905eaec08f79d6c938b70ce4007e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e4fcb4037bc16967e23c20126d25396"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2e4fcb4037bc16967e23c20126d25396"></a>
typedef Vector2&lt; unsigned &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga2e4fcb4037bc16967e23c20126d25396">Sifteo::UInt2</a></td></tr>
<tr class="memdesc:ga2e4fcb4037bc16967e23c20126d25396"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned ints. <br/></td></tr>
<tr class="separator:ga2e4fcb4037bc16967e23c20126d25396"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3c88fa6a9f6d33e034025f190109a7b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3c88fa6a9f6d33e034025f190109a7b9"></a>
typedef Vector3&lt; unsigned &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga3c88fa6a9f6d33e034025f190109a7b9">Sifteo::UInt3</a></td></tr>
<tr class="memdesc:ga3c88fa6a9f6d33e034025f190109a7b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned ints. <br/></td></tr>
<tr class="separator:ga3c88fa6a9f6d33e034025f190109a7b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9158a84114b141c31959181d043b7eef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9158a84114b141c31959181d043b7eef"></a>
typedef Vector2&lt; unsigned short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga9158a84114b141c31959181d043b7eef">Sifteo::UShort2</a></td></tr>
<tr class="memdesc:ga9158a84114b141c31959181d043b7eef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned shorts. <br/></td></tr>
<tr class="separator:ga9158a84114b141c31959181d043b7eef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64804b219b2af4a9e44d38a2e8793503"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga64804b219b2af4a9e44d38a2e8793503"></a>
typedef Vector3&lt; unsigned short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga64804b219b2af4a9e44d38a2e8793503">Sifteo::UShort3</a></td></tr>
<tr class="memdesc:ga64804b219b2af4a9e44d38a2e8793503"><td class="mdescLeft">&#160;</td><td class="mdescRight">Typedef for a 2-vector of unsigned shorts. <br/></td></tr>
<tr class="separator:ga64804b219b2af4a9e44d38a2e8793503"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadfdd37c09079cfe60965b09b186a24f0"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:gadfdd37c09079cfe60965b09b186a24f0"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gadfdd37c09079cfe60965b09b186a24f0">Sifteo::abs</a> (const T &amp;value)</td></tr>
<tr class="memdesc:gadfdd37c09079cfe60965b09b186a24f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">For any type, return the absolute value.  <a href="#gadfdd37c09079cfe60965b09b186a24f0">More...</a><br/></td></tr>
<tr class="separator:gadfdd37c09079cfe60965b09b186a24f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8dd59f9dcdfebc7490e3a12c719812c"><td class="memTemplParams" colspan="2"><a class="anchor" id="gaf8dd59f9dcdfebc7490e3a12c719812c"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gaf8dd59f9dcdfebc7490e3a12c719812c"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gaf8dd59f9dcdfebc7490e3a12c719812c">Sifteo::almostEqual</a> (const T a, const T b, const T epsilon)</td></tr>
<tr class="memdesc:gaf8dd59f9dcdfebc7490e3a12c719812c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true when 'a' and 'b' are within 'epsilon' of each other. <br/></td></tr>
<tr class="separator:gaf8dd59f9dcdfebc7490e3a12c719812c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2cb197e1587bb5037269b8e5a93500a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2cb197e1587bb5037269b8e5a93500a1"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga2cb197e1587bb5037269b8e5a93500a1">Sifteo::atan</a> (float x)</td></tr>
<tr class="memdesc:ga2cb197e1587bb5037269b8e5a93500a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-precision arc tangent function, of one variable. <br/></td></tr>
<tr class="separator:ga2cb197e1587bb5037269b8e5a93500a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa92d27de8e361aa4f3ec49835f2a1623"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gaa92d27de8e361aa4f3ec49835f2a1623">Sifteo::atan2</a> (float a, float b)</td></tr>
<tr class="memdesc:gaa92d27de8e361aa4f3ec49835f2a1623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-precision arc tangent function, of two variables.  <a href="#gaa92d27de8e361aa4f3ec49835f2a1623">More...</a><br/></td></tr>
<tr class="separator:gaa92d27de8e361aa4f3ec49835f2a1623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab99e4d068797e2f419e3c48a76af1144"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:gab99e4d068797e2f419e3c48a76af1144"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gab99e4d068797e2f419e3c48a76af1144">Sifteo::bitRange</a> (int begin, int end)</td></tr>
<tr class="memdesc:gab99e4d068797e2f419e3c48a76af1144"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a value of type T which has bits set in the half-open interval [begin, end).  <a href="#gab99e4d068797e2f419e3c48a76af1144">More...</a><br/></td></tr>
<tr class="separator:gab99e4d068797e2f419e3c48a76af1144"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga012f41b1c87f89adb8db0d357762bc5b"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga012f41b1c87f89adb8db0d357762bc5b"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga012f41b1c87f89adb8db0d357762bc5b">Sifteo::ceil</a> (const T value)</td></tr>
<tr class="memdesc:ga012f41b1c87f89adb8db0d357762bc5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next integer value closer to positive infinity from 'value'.  <a href="#ga012f41b1c87f89adb8db0d357762bc5b">More...</a><br/></td></tr>
<tr class="separator:ga012f41b1c87f89adb8db0d357762bc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf797a19cdc5c3a124f146e6faf6cafe0"><td class="memTemplParams" colspan="2"><a class="anchor" id="gaf797a19cdc5c3a124f146e6faf6cafe0"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gaf797a19cdc5c3a124f146e6faf6cafe0"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gaf797a19cdc5c3a124f146e6faf6cafe0">Sifteo::ceildiv</a> (T numerator, T denominator)</td></tr>
<tr class="memdesc:gaf797a19cdc5c3a124f146e6faf6cafe0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ceiling division. Divide, rounding up instead of down. <br/></td></tr>
<tr class="separator:gaf797a19cdc5c3a124f146e6faf6cafe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d41be453074674182cb7d1d7c759d91"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga7d41be453074674182cb7d1d7c759d91"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga7d41be453074674182cb7d1d7c759d91">Sifteo::clamp</a> (const T &amp;value, const T &amp;low, const T &amp;high)</td></tr>
<tr class="memdesc:ga7d41be453074674182cb7d1d7c759d91"><td class="mdescLeft">&#160;</td><td class="mdescRight">For any type, clamp a value to the extremes 'low' and 'high'.  <a href="#ga7d41be453074674182cb7d1d7c759d91">More...</a><br/></td></tr>
<tr class="separator:ga7d41be453074674182cb7d1d7c759d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cf109c83c9cc94b55fe03126792c6bd"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga4cf109c83c9cc94b55fe03126792c6bd">Sifteo::clz</a> (uint32_t word)</td></tr>
<tr class="memdesc:ga4cf109c83c9cc94b55fe03126792c6bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count leading zeroes in a 32-bit word.  <a href="#ga4cf109c83c9cc94b55fe03126792c6bd">More...</a><br/></td></tr>
<tr class="separator:ga4cf109c83c9cc94b55fe03126792c6bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2d6750df5f8e49a1170b8f681502b13"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gac2d6750df5f8e49a1170b8f681502b13">Sifteo::cos</a> (float x)</td></tr>
<tr class="memdesc:gac2d6750df5f8e49a1170b8f681502b13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the cosine of a specified angle, in radians. Single-precision.  <a href="#gac2d6750df5f8e49a1170b8f681502b13">More...</a><br/></td></tr>
<tr class="separator:gac2d6750df5f8e49a1170b8f681502b13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7eebcc537123b8edf7efd6680bfde64c"><td class="memTemplParams" colspan="2"><a class="anchor" id="ga7eebcc537123b8edf7efd6680bfde64c"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga7eebcc537123b8edf7efd6680bfde64c"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga7eebcc537123b8edf7efd6680bfde64c">Sifteo::cross</a> (T u, T v)</td></tr>
<tr class="memdesc:ga7eebcc537123b8edf7efd6680bfde64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector cross-product. <br/></td></tr>
<tr class="separator:ga7eebcc537123b8edf7efd6680bfde64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed7c12b9ab92540d789a1a4322bafff3"><td class="memTemplParams" colspan="2"><a class="anchor" id="gaed7c12b9ab92540d789a1a4322bafff3"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gaed7c12b9ab92540d789a1a4322bafff3"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gaed7c12b9ab92540d789a1a4322bafff3">Sifteo::dot</a> (Vector2&lt; T &gt; u, Vector2&lt; T &gt; v)</td></tr>
<tr class="memdesc:gaed7c12b9ab92540d789a1a4322bafff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector dot-product. <br/></td></tr>
<tr class="separator:gaed7c12b9ab92540d789a1a4322bafff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40f30e4e24c977d91d95d42eb76889f8"><td class="memTemplParams" colspan="2"><a class="anchor" id="ga40f30e4e24c977d91d95d42eb76889f8"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga40f30e4e24c977d91d95d42eb76889f8"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga40f30e4e24c977d91d95d42eb76889f8">Sifteo::dot</a> (Vector3&lt; T &gt; u, Vector3&lt; T &gt; v)</td></tr>
<tr class="memdesc:ga40f30e4e24c977d91d95d42eb76889f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector dot-product. <br/></td></tr>
<tr class="separator:ga40f30e4e24c977d91d95d42eb76889f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae573cb5ba7e18079d9e661e486f994a6"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae573cb5ba7e18079d9e661e486f994a6">Sifteo::ffs</a> (uint32_t word)</td></tr>
<tr class="memdesc:gae573cb5ba7e18079d9e661e486f994a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find first bit set in a 32-bit word.  <a href="#gae573cb5ba7e18079d9e661e486f994a6">More...</a><br/></td></tr>
<tr class="separator:gae573cb5ba7e18079d9e661e486f994a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c9700ed238eb7178f6f4877598d2c8b"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga4c9700ed238eb7178f6f4877598d2c8b"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga4c9700ed238eb7178f6f4877598d2c8b">Sifteo::floor</a> (const T value)</td></tr>
<tr class="memdesc:ga4c9700ed238eb7178f6f4877598d2c8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next integer value closer to negative infinity from 'value'.  <a href="#ga4c9700ed238eb7178f6f4877598d2c8b">More...</a><br/></td></tr>
<tr class="separator:ga4c9700ed238eb7178f6f4877598d2c8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d9151f81e76f9c4e4f573e5ab6c892e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3d9151f81e76f9c4e4f573e5ab6c892e"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga3d9151f81e76f9c4e4f573e5ab6c892e">Sifteo::fmod</a> (float a, float b)</td></tr>
<tr class="memdesc:ga3d9151f81e76f9c4e4f573e5ab6c892e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the remainder (modulo) operation for two floating point numbers. Single-precision. <br/></td></tr>
<tr class="separator:ga3d9151f81e76f9c4e4f573e5ab6c892e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga405aaa390bf918b4c2949a8467d6048d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga405aaa390bf918b4c2949a8467d6048d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga405aaa390bf918b4c2949a8467d6048d">Sifteo::fmod</a> (double a, double b)</td></tr>
<tr class="memdesc:ga405aaa390bf918b4c2949a8467d6048d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the remainder (modulo) operation for two floating point numbers. Double-precision. <br/></td></tr>
<tr class="separator:ga405aaa390bf918b4c2949a8467d6048d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43a8cdf21fa4d18f07dec1720be2d837"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga43a8cdf21fa4d18f07dec1720be2d837">Sifteo::isunordered</a> (float a, float b=0.f)</td></tr>
<tr class="memdesc:ga43a8cdf21fa4d18f07dec1720be2d837"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unordered comparison.  <a href="#ga43a8cdf21fa4d18f07dec1720be2d837">More...</a><br/></td></tr>
<tr class="separator:ga43a8cdf21fa4d18f07dec1720be2d837"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fd63a5f35439ec6247bc7c6cb0acbc2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga6fd63a5f35439ec6247bc7c6cb0acbc2">Sifteo::isunordered</a> (double a, double b=0.f)</td></tr>
<tr class="memdesc:ga6fd63a5f35439ec6247bc7c6cb0acbc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unordered comparison.  <a href="#ga6fd63a5f35439ec6247bc7c6cb0acbc2">More...</a><br/></td></tr>
<tr class="separator:ga6fd63a5f35439ec6247bc7c6cb0acbc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c75549406b0cd0f1c3751641740f668"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4c75549406b0cd0f1c3751641740f668"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga4c75549406b0cd0f1c3751641740f668">Sifteo::log</a> (float a)</td></tr>
<tr class="memdesc:ga4c75549406b0cd0f1c3751641740f668"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the natural log of a floating point number. Single-precision. <br/></td></tr>
<tr class="separator:ga4c75549406b0cd0f1c3751641740f668"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50e18529e91437b4bc8f94a37801a606"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga50e18529e91437b4bc8f94a37801a606"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga50e18529e91437b4bc8f94a37801a606">Sifteo::log</a> (double a)</td></tr>
<tr class="memdesc:ga50e18529e91437b4bc8f94a37801a606"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the natural log of a floating point number. Double-precision. <br/></td></tr>
<tr class="separator:ga50e18529e91437b4bc8f94a37801a606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga299e958ec0ad2b0c1e20e601671b90ad"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga299e958ec0ad2b0c1e20e601671b90ad"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga299e958ec0ad2b0c1e20e601671b90ad">Sifteo::lslc</a> (const T &amp;value, int bits)</td></tr>
<tr class="memdesc:ga299e958ec0ad2b0c1e20e601671b90ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logical shift left with clamping.  <a href="#ga299e958ec0ad2b0c1e20e601671b90ad">More...</a><br/></td></tr>
<tr class="separator:ga299e958ec0ad2b0c1e20e601671b90ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9929710b21fe1361fecb23da1421c6cb"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga9929710b21fe1361fecb23da1421c6cb"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga9929710b21fe1361fecb23da1421c6cb">Sifteo::lsrc</a> (const T &amp;value, int bits)</td></tr>
<tr class="memdesc:ga9929710b21fe1361fecb23da1421c6cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logical shift right with clamping.  <a href="#ga9929710b21fe1361fecb23da1421c6cb">More...</a><br/></td></tr>
<tr class="separator:ga9929710b21fe1361fecb23da1421c6cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1448adbca0e66236057dbc99663a9b3"><td class="memTemplParams" colspan="2"><a class="anchor" id="gae1448adbca0e66236057dbc99663a9b3"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gae1448adbca0e66236057dbc99663a9b3"><td class="memTemplItemLeft" align="right" valign="top">Vector2&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gae1448adbca0e66236057dbc99663a9b3">Sifteo::polar</a> (T angle, T magnitude)</td></tr>
<tr class="memdesc:gae1448adbca0e66236057dbc99663a9b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert polar to cartesian. <br/></td></tr>
<tr class="separator:gae1448adbca0e66236057dbc99663a9b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3446e8ce8d114dc81a814984c61431c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae3446e8ce8d114dc81a814984c61431c"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae3446e8ce8d114dc81a814984c61431c">Sifteo::pow</a> (float a, float b)</td></tr>
<tr class="memdesc:gae3446e8ce8d114dc81a814984c61431c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute 'x' raised to the power 'y'. Single-precision. <br/></td></tr>
<tr class="separator:gae3446e8ce8d114dc81a814984c61431c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga07a5ddecb26025a011adb4da5941fb10"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga07a5ddecb26025a011adb4da5941fb10"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga07a5ddecb26025a011adb4da5941fb10">Sifteo::pow</a> (double a, double b)</td></tr>
<tr class="memdesc:ga07a5ddecb26025a011adb4da5941fb10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute 'x' raised to the power 'y'. Double-precision. <br/></td></tr>
<tr class="separator:ga07a5ddecb26025a011adb4da5941fb10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1859c1422ddbe0ce404c4215613300fc"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga1859c1422ddbe0ce404c4215613300fc"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga1859c1422ddbe0ce404c4215613300fc">Sifteo::round</a> (const T value)</td></tr>
<tr class="memdesc:ga1859c1422ddbe0ce404c4215613300fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rounds 'value' to the nearest whole value.  <a href="#ga1859c1422ddbe0ce404c4215613300fc">More...</a><br/></td></tr>
<tr class="separator:ga1859c1422ddbe0ce404c4215613300fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5ac250fc2b7c3f647ad5dd76f80a57e"><td class="memTemplParams" colspan="2"><a class="anchor" id="gad5ac250fc2b7c3f647ad5dd76f80a57e"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gad5ac250fc2b7c3f647ad5dd76f80a57e"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gad5ac250fc2b7c3f647ad5dd76f80a57e">Sifteo::roundup</a> (T numerator, T denominator)</td></tr>
<tr class="memdesc:gad5ac250fc2b7c3f647ad5dd76f80a57e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Round 'numerator' up to the nearest multiple of 'denominator'. Only for integer types. <br/></td></tr>
<tr class="separator:gad5ac250fc2b7c3f647ad5dd76f80a57e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf9c3188aeeb64b61d3769108a0c845cd"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gaf9c3188aeeb64b61d3769108a0c845cd">Sifteo::sin</a> (float x)</td></tr>
<tr class="memdesc:gaf9c3188aeeb64b61d3769108a0c845cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the sine of a specified angle, in radians. Single-precision.  <a href="#gaf9c3188aeeb64b61d3769108a0c845cd">More...</a><br/></td></tr>
<tr class="separator:gaf9c3188aeeb64b61d3769108a0c845cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga638c110b2937214ee62cbc7ddabad130"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga638c110b2937214ee62cbc7ddabad130">Sifteo::sincos</a> (float x, float *s, float *c)</td></tr>
<tr class="memdesc:ga638c110b2937214ee62cbc7ddabad130"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simultaneously compute the sine and cosine of a specified angle, in radians.  <a href="#ga638c110b2937214ee62cbc7ddabad130">More...</a><br/></td></tr>
<tr class="separator:ga638c110b2937214ee62cbc7ddabad130"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20311b4dc8c3af67579a2517c36e2e4e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga20311b4dc8c3af67579a2517c36e2e4e"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga20311b4dc8c3af67579a2517c36e2e4e">Sifteo::sqrt</a> (float a)</td></tr>
<tr class="memdesc:ga20311b4dc8c3af67579a2517c36e2e4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the square root of a floating point number. Single-precision. <br/></td></tr>
<tr class="separator:ga20311b4dc8c3af67579a2517c36e2e4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28b7d0348f10505fb9b828371f895d32"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga28b7d0348f10505fb9b828371f895d32"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga28b7d0348f10505fb9b828371f895d32">Sifteo::sqrt</a> (double a)</td></tr>
<tr class="memdesc:ga28b7d0348f10505fb9b828371f895d32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the square root of a floating point number. Double-precision. <br/></td></tr>
<tr class="separator:ga28b7d0348f10505fb9b828371f895d32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga552ba31837ff030ace32e39455344b2a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga552ba31837ff030ace32e39455344b2a"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga552ba31837ff030ace32e39455344b2a">Sifteo::tan</a> (float x)</td></tr>
<tr class="memdesc:ga552ba31837ff030ace32e39455344b2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the tangent of a specified angle, in radians. Single-precision. <br/></td></tr>
<tr class="separator:ga552ba31837ff030ace32e39455344b2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadd2bea115d12a254d0532c86fd247eb7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gadd2bea115d12a254d0532c86fd247eb7">Sifteo::tcos</a> (float x)</td></tr>
<tr class="memdesc:gadd2bea115d12a254d0532c86fd247eb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Table-driven drop-in replacement for <a class="el" href="group__math.html#gac2d6750df5f8e49a1170b8f681502b13" title="Calculate the cosine of a specified angle, in radians. Single-precision.">cos()</a>  <a href="#gadd2bea115d12a254d0532c86fd247eb7">More...</a><br/></td></tr>
<tr class="separator:gadd2bea115d12a254d0532c86fd247eb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3e036d15ed47bf3514d19f9796e76ee"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gae3e036d15ed47bf3514d19f9796e76ee">Sifteo::tcosi</a> (int x)</td></tr>
<tr class="memdesc:gae3e036d15ed47bf3514d19f9796e76ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer cosine table lookup.  <a href="#gae3e036d15ed47bf3514d19f9796e76ee">More...</a><br/></td></tr>
<tr class="separator:gae3e036d15ed47bf3514d19f9796e76ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga652bc802d1b4491b90a1172f8d7e628b"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga652bc802d1b4491b90a1172f8d7e628b">Sifteo::tsin</a> (float x)</td></tr>
<tr class="memdesc:ga652bc802d1b4491b90a1172f8d7e628b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Table-driven drop-in replacement for <a class="el" href="group__math.html#gaf9c3188aeeb64b61d3769108a0c845cd" title="Calculate the sine of a specified angle, in radians. Single-precision.">sin()</a>  <a href="#ga652bc802d1b4491b90a1172f8d7e628b">More...</a><br/></td></tr>
<tr class="separator:ga652bc802d1b4491b90a1172f8d7e628b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26d92e54204a9ca8e496a930b3402ad4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#ga26d92e54204a9ca8e496a930b3402ad4">Sifteo::tsini</a> (int x)</td></tr>
<tr class="memdesc:ga26d92e54204a9ca8e496a930b3402ad4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer sine table lookup.  <a href="#ga26d92e54204a9ca8e496a930b3402ad4">More...</a><br/></td></tr>
<tr class="separator:ga26d92e54204a9ca8e496a930b3402ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd70c1d896652ae6cd08793202b929bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacd70c1d896652ae6cd08793202b929bf"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__math.html#gacd70c1d896652ae6cd08793202b929bf">Sifteo::umod</a> (int a, int b)</td></tr>
<tr class="memdesc:gacd70c1d896652ae6cd08793202b929bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the unsigned remainder from dividing two signed integers. <br/></td></tr>
<tr class="separator:gacd70c1d896652ae6cd08793202b929bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab18c9af04a4a3a4a3c63656e40ab74ed"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:gab18c9af04a4a3a4a3c63656e40ab74ed"><td class="memTemplItemLeft" align="right" valign="top">Vector2&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#gab18c9af04a4a3a4a3c63656e40ab74ed">Sifteo::vec</a> (T x, T y)</td></tr>
<tr class="memdesc:gab18c9af04a4a3a4a3c63656e40ab74ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Vector2</a>, from a set of (x,y) coordinates.  <a href="#gab18c9af04a4a3a4a3c63656e40ab74ed">More...</a><br/></td></tr>
<tr class="separator:gab18c9af04a4a3a4a3c63656e40ab74ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5a82b10ac56daa5121035dbaf1689d3a"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga5a82b10ac56daa5121035dbaf1689d3a"><td class="memTemplItemLeft" align="right" valign="top">Vector3&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__math.html#ga5a82b10ac56daa5121035dbaf1689d3a">Sifteo::vec</a> (T x, T y, T z)</td></tr>
<tr class="memdesc:ga5a82b10ac56daa5121035dbaf1689d3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="struct_sifteo_1_1_vector3.html" title="Generalized three-element cartesian coordinate vector.">Vector3</a>, from a set of (x, y, z) coordinates.  <a href="#ga5a82b10ac56daa5121035dbaf1689d3a">More...</a><br/></td></tr>
<tr class="separator:ga5a82b10ac56daa5121035dbaf1689d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Floating point and integer math, matrices, vectors. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gadfdd37c09079cfe60965b09b186a24f0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T Sifteo::abs </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>For any type, return the absolute value. </p>
<p>If the value is less than zero, we return -value. Otherwise, we return the unmodified value. </p>

</div>
</div>
<a class="anchor" id="gaa92d27de8e361aa4f3ec49835f2a1623"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Sifteo::atan2 </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Single-precision arc tangent function, of two variables. </p>
<p>This computes the arc tangent of y/x, using the sign of each argument to determine which quadrant the result is in. </p>

</div>
</div>
<a class="anchor" id="gab99e4d068797e2f419e3c48a76af1144"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T Sifteo::bitRange </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return a value of type T which has bits set in the half-open interval [begin, end). </p>
<p>The range may include negative values and/or values greater than the width of the type. </p>

</div>
</div>
<a class="anchor" id="ga012f41b1c87f89adb8db0d357762bc5b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long Sifteo::ceil </td>
          <td>(</td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the next integer value closer to positive infinity from 'value'. </p>
<p>E.g.: </p>
<pre class="fragment">ceil(1.0) =&gt; 1.0
ceil(1.1) =&gt; 2.0
ceil(-1.0) =&gt; -1.0
ceil(-1.1) =&gt; -1.0
ceil(-1.9) =&gt; -1.0</pre> 
</div>
</div>
<a class="anchor" id="ga7d41be453074674182cb7d1d7c759d91"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T Sifteo::clamp </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>low</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>high</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>For any type, clamp a value to the extremes 'low' and 'high'. </p>
<p>If the value is less than 'low' we return 'low', and if it's greater than 'high' we return 'high'. Otherwise we return the value unmodified. </p>

</div>
</div>
<a class="anchor" id="ga4cf109c83c9cc94b55fe03126792c6bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned Sifteo::clz </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>word</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count leading zeroes in a 32-bit word. </p>
<p>If the parameter is nonzero, returns a number between 0 and 31 indicating how many leading zeroes are present in the parameter, starting at the most significant bit. If the parameter is zero, returns 32.</p>
<p>This function is very fast: it is implemented as a single CPU instruction. </p>

</div>
</div>
<a class="anchor" id="gac2d6750df5f8e49a1170b8f681502b13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Sifteo::cos </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the cosine of a specified angle, in radians. Single-precision. </p>
<p>Trigonometry functions are very slow. If you're computing more than a few sine or cosine values per frame, consider using the table-driven alternative <a class="el" href="group__math.html#ga652bc802d1b4491b90a1172f8d7e628b" title="Table-driven drop-in replacement for sin()">tsin()</a>. </p>

</div>
</div>
<a class="anchor" id="gae573cb5ba7e18079d9e661e486f994a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned Sifteo::ffs </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>word</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find first bit set in a 32-bit word. </p>
<p>Finds the first bit set in a word, starting with the least significant bit. If no bits are set (the argument was zero), returns zero. Otherwise, returns a number between 1 (LSB) and 32 (MSB).</p>
<p>This function is implemented using <a class="el" href="group__math.html#ga4cf109c83c9cc94b55fe03126792c6bd" title="Count leading zeroes in a 32-bit word.">clz()</a>. </p>

</div>
</div>
<a class="anchor" id="ga4c9700ed238eb7178f6f4877598d2c8b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long Sifteo::floor </td>
          <td>(</td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the next integer value closer to negative infinity from 'value'. </p>
<p>E.g.: </p>
<pre class="fragment">floor(1.0) =&gt; 1.0
floor(1.9) =&gt; 1.0
floor(-1.0) =&gt; -1.0
floor(-1.1) =&gt; -2.0
floor(-1.9) =&gt; -2.0</pre> 
</div>
</div>
<a class="anchor" id="ga43a8cdf21fa4d18f07dec1720be2d837"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Sifteo::isunordered </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>b</em> = <code>0.f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Unordered comparison. </p>
<p>Given one or two single-precision floating point numbers, is there no defined sort order between them?</p>
<p>Returns true if either or both arguments are NaN. </p>

</div>
</div>
<a class="anchor" id="ga6fd63a5f35439ec6247bc7c6cb0acbc2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Sifteo::isunordered </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>b</em> = <code>0.f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Unordered comparison. </p>
<p>Given one or two double-precision floating point numbers, is there no defined sort order between them?</p>
<p>Returns true if either or both arguments are NaN. </p>

</div>
</div>
<a class="anchor" id="ga299e958ec0ad2b0c1e20e601671b90ad"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T Sifteo::lslc </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Logical shift left with clamping. </p>
<p>If the shift amount is negative, it is treated as zero. Shift amounts greater than or equal to the word width will always return zero. </p>

</div>
</div>
<a class="anchor" id="ga9929710b21fe1361fecb23da1421c6cb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T Sifteo::lsrc </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Logical shift right with clamping. </p>
<p>If the shift amount is negative, it is treated as zero. Shift amounts greater than or equal to the word width will always return zero. </p>

</div>
</div>
<a class="anchor" id="ga1859c1422ddbe0ce404c4215613300fc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long Sifteo::round </td>
          <td>(</td>
          <td class="paramtype">const T&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Rounds 'value' to the nearest whole value. </p>
<p>E.g.: </p>
<pre class="fragment">round(1.4) =&gt; 1.0
round(1.5) =&gt; 2.0

round(-1.4) =&gt; -1.0
round(-1.5) =&gt; -1.0
round(-1.51) =&gt; -2.0</pre> 
</div>
</div>
<a class="anchor" id="gaf9c3188aeeb64b61d3769108a0c845cd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Sifteo::sin </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the sine of a specified angle, in radians. Single-precision. </p>
<p>Trigonometry functions are very slow. If you're computing more than a few sine or cosine values per frame, consider using the table-driven alternative <a class="el" href="group__math.html#ga652bc802d1b4491b90a1172f8d7e628b" title="Table-driven drop-in replacement for sin()">tsin()</a>. </p>

</div>
</div>
<a class="anchor" id="ga638c110b2937214ee62cbc7ddabad130"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::sincos </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Simultaneously compute the sine and cosine of a specified angle, in radians. </p>
<p>This yields two single-precision floating point results, returned via the pointers 's' and 'c'. </p>

</div>
</div>
<a class="anchor" id="gadd2bea115d12a254d0532c86fd247eb7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Sifteo::tcos </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Table-driven drop-in replacement for <a class="el" href="group__math.html#gac2d6750df5f8e49a1170b8f681502b13" title="Calculate the cosine of a specified angle, in radians. Single-precision.">cos()</a> </p>
<p>This calculates the cosine of a specified angle, in radians. Usage is identical to <a class="el" href="group__math.html#gac2d6750df5f8e49a1170b8f681502b13" title="Calculate the cosine of a specified angle, in radians. Single-precision.">cos()</a>, but the implementation is based on the same fast table lookup used by <a class="el" href="group__math.html#ga26d92e54204a9ca8e496a930b3402ad4" title="Integer sine table lookup.">tsini()</a> and <a class="el" href="group__math.html#gae3e036d15ed47bf3514d19f9796e76ee" title="Integer cosine table lookup.">tcosi()</a>. </p>

</div>
</div>
<a class="anchor" id="gae3e036d15ed47bf3514d19f9796e76ee"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Sifteo::tcosi </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Integer cosine table lookup. </p>
<p>This is an all-integer table driven alternative to <a class="el" href="group__math.html#gac2d6750df5f8e49a1170b8f681502b13" title="Calculate the cosine of a specified angle, in radians. Single-precision.">cos()</a>. It is very fast. The lookup table is stored in very fast internal flash memory.</p>
<p>The input angle is specified in units of 360/8192 degrees. A full circle is exactly 8192 units, meaning that a 90 degree arc is 2048 units. The result is in fixed-point, with 16 bits to the right of the binary point. A value of 1.0 is represented by exactly 65536.</p>
<p>Only the low 13 bits of the input angle are used. This function is implemented as a thin wrapper around <a class="el" href="group__math.html#ga26d92e54204a9ca8e496a930b3402ad4" title="Integer sine table lookup.">tsini()</a>. </p>

</div>
</div>
<a class="anchor" id="ga652bc802d1b4491b90a1172f8d7e628b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Sifteo::tsin </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Table-driven drop-in replacement for <a class="el" href="group__math.html#gaf9c3188aeeb64b61d3769108a0c845cd" title="Calculate the sine of a specified angle, in radians. Single-precision.">sin()</a> </p>
<p>This calculates the sine of a specified angle, in radians. Usage is identical to <a class="el" href="group__math.html#gaf9c3188aeeb64b61d3769108a0c845cd" title="Calculate the sine of a specified angle, in radians. Single-precision.">sin()</a>, but the implementation is based on the same fast table lookup used by <a class="el" href="group__math.html#ga26d92e54204a9ca8e496a930b3402ad4" title="Integer sine table lookup.">tsini()</a> and <a class="el" href="group__math.html#gae3e036d15ed47bf3514d19f9796e76ee" title="Integer cosine table lookup.">tcosi()</a>. </p>

</div>
</div>
<a class="anchor" id="ga26d92e54204a9ca8e496a930b3402ad4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Sifteo::tsini </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Integer sine table lookup. </p>
<p>This is an all-integer table driven alternative to <a class="el" href="group__math.html#gaf9c3188aeeb64b61d3769108a0c845cd" title="Calculate the sine of a specified angle, in radians. Single-precision.">sin()</a>. It is very fast. The lookup table is stored in very fast internal flash memory.</p>
<p>The input angle is specified in units of 360/8192 degrees. A full circle is exactly 8192 units, meaning that a 90 degree arc is 2048 units. The result is in fixed-point, with 16 bits to the right of the binary point. A value of 1.0 is represented by exactly 65536.</p>
<p>Only the low 13 bits of the input angle are used. </p>

</div>
</div>
<a class="anchor" id="gab18c9af04a4a3a4a3c63656e40ab74ed"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector2&lt;T&gt; Sifteo::vec </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a <a class="el" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Vector2</a>, from a set of (x,y) coordinates. </p>
<p>This is a standalone function, instead of a constructor, so that <a class="el" href="struct_sifteo_1_1_vector2.html" title="Generalized two-element cartesian coordinate vector.">Vector2</a> can remain a POD type, and it can be used in unions. </p>

</div>
</div>
<a class="anchor" id="ga5a82b10ac56daa5121035dbaf1689d3a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector3&lt;T&gt; Sifteo::vec </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a <a class="el" href="struct_sifteo_1_1_vector3.html" title="Generalized three-element cartesian coordinate vector.">Vector3</a>, from a set of (x, y, z) coordinates. </p>
<p>This is a standalone function, instead of a constructor, so that <a class="el" href="struct_sifteo_1_1_vector3.html" title="Generalized three-element cartesian coordinate vector.">Vector3</a> can remain a POD type, and it can be used in unions. </p>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
